// Author	: damphat@gmail.com
// Created	: 01/12/2008

#pragma once
#include "vn/IOCommon.h"

#define HRESULT_IO (7 + HRESULT_UNKNOWN)

IO_BEGIN

DECLARE_EXCEPTION_CLASS(IOException, Exception, HRESULT_IO)
DECLARE_EXCEPTION_CLASS(FileNotFoundException, IOException, HRESULT_IO)

#define CHECK_IO(condition)\
	if(!(condition)) {\
	IOException e(GetLastError(), #condition);\
	throw e;\
	}

IO_END
